<?php
require_once (dirname(__FILE__) . '/source/init.php');
if (isLogined()) {
    header("location:index.php");
}

require_once 'source/init.php';
$op = get_get("op");
if($op=="login"&&isAjaxRequest()){
    $pass=(get_post("password"));
    $uid=(get_post("userid"));
    if ($pass != "" && $uid != "") {
        if (userLogin($pass, $uid)) {
            success("登录成功");
        }else{
            fail("登录失败，请重试");
        }
    }else{
        fail("参数错误，请完整填写登录信息后再提交");
    }
}
loadTemp("system/login_temp.php");
?>
